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

(fix): fixed tcpip_keepalive for TCPIPSocketSession (#396) #397

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

oliverpetschick
Copy link
Contributor

Hi,

fixes #396 deprecated attribute ".sock" for TCPIPSocketSessions.

I've also included type hints for the self.interface classes, making it easier to detect such issues promptly. After implementing this change, I tested it with the same code block that initially triggered the error, and it executed as intended.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (79fd091) 23.14% compared to head (3494e6f) 23.14%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #397   +/-   ##
=======================================
  Coverage   23.14%   23.14%           
=======================================
  Files          23       23           
  Lines        3318     3318           
  Branches      458      458           
=======================================
  Hits          768      768           
  Misses       2533     2533           
  Partials       17       17           
Flag Coverage Δ
unittests 23.14% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
pyvisa_py/tcpip.py 20.47% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliverpetschick
Copy link
Contributor Author

I reverted the type hints since mypy does not allow the assignment of = None to predefined types.

@MatthieuDartiailh
Copy link
Member

It is a bit sad, I liked those. Anyway thanks for the patch. I will merge and I will cut a new release either tonight or next week.

@MatthieuDartiailh MatthieuDartiailh merged commit ea7fa43 into pyvisa:main Oct 16, 2023
16 of 17 checks passed
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.

Attribute Error when setting VI_ATTR_TCPIP_KEEPALIVE to True
2 participants