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

Don't create IPv6 socket if IPv6 is disabled #3136

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

jackwilsdon
Copy link
Contributor

test_socket.py:test_sniff_sockopts creates an IPv6 socket even if IPv6 is disabled. This PR changes the test to only create the socket if IPv6 is available.

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.62%. Comparing base (785dc59) to head (6995a38).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/trio/_tests/test_socket.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3136      +/-   ##
==========================================
- Coverage   99.62%   99.62%   -0.01%     
==========================================
  Files         122      122              
  Lines       18357    18360       +3     
  Branches     1221     1222       +1     
==========================================
+ Hits        18289    18291       +2     
  Misses         47       47              
- Partials       21       22       +1     
Files with missing lines Coverage Δ
src/trio/_tests/test_socket.py 99.84% <75.00%> (-0.16%) ⬇️

Copy link
Contributor

@A5rocks A5rocks left a comment

Choose a reason for hiding this comment

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

This makes sense to me. Did you run into this when running trio's test suite and this was the only issue?

@jackwilsdon
Copy link
Contributor Author

Yeah all other tests passed with IPv6 disabled 👍

Copy link
Member

@CoolCat467 CoolCat467 left a comment

Choose a reason for hiding this comment

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

Looks good

@A5rocks
Copy link
Contributor

A5rocks commented Nov 18, 2024

Made #3137 as a follow-up.

@A5rocks A5rocks merged commit 8f2c08c into python-trio:main Nov 18, 2024
37 of 39 checks passed
@trio-bot
Copy link

trio-bot bot commented Nov 18, 2024

Hey @jackwilsdon, it looks like that was the first time we merged one of your PRs! Thanks so much! 🎉 🎂

If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:

  • Github will automatically subscribe you to notifications on all our repositories. (But you can unsubscribe again if you don't want the spam.)

  • You'll be able to help us manage issues (add labels, close them, etc.)

  • You'll be able to review and merge other people's pull requests

  • You'll get a [member] badge next to your name when participating in the Trio repos, and you'll have the option of adding your name to our member's page and putting our icon on your Github profile (details)

If you want to read more, here's the relevant section in our contributing guide.

Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you.

If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out!

@jackwilsdon jackwilsdon deleted the fix-ipv6-test branch November 18, 2024 20:59
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